/* 现代化大屏监控系统样式 */

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 根变量定义 */
:root {
    /* 主色调 */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    
    /* 辅助色 */
    --secondary-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    /* 中性色 */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* 背景渐变 */
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-gradient: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* 圆角 */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* 动画 */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* 基础样式 */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-gradient);
    color: white;
    overflow: hidden;
    height: 100vh;
    line-height: 1.6;
}

/* 背景动画 */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite linear;
}

.circle-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.circle-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 10%;
    animation-delay: -5s;
}

.circle-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 20%;
    animation-delay: -10s;
}

.circle-4 {
    width: 120px;
    height: 120px;
    top: 30%;
    right: 30%;
    animation-delay: -15s;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.3;
    }
    100% {
        transform: translateY(0px) rotate(360deg);
        opacity: 0.7;
    }
}

/* 主容器 */
.modern-dashboard {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

/* 顶部导航栏 */
.modern-header {
    background: var(--card-gradient);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 2rem; /* 24寸显示器标准内边距 */
    box-shadow: var(--shadow-lg);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.logo-text h1 {
    font-size: 2.2rem; /* 60寸大屏标题字体 */
    font-weight: 700;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, #ffffff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text p {
    font-size: 1.1rem; /* 60寸大屏副标题字体 */
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

.time-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.current-time {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.6rem; /* 60寸大屏时间显示字体 */
    font-weight: 600;
}

.current-time i {
    color: var(--primary-color);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem; /* 60寸大屏状态指示器字体 */
    color: rgba(255, 255, 255, 0.8);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: blink 2s infinite;
}

.status-dot.online {
    background: var(--success-color);
}

.status-dot.offline {
    background: var(--error-color);
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0.3;
    }
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 280px 1fr; /* 只保留左侧面板和中央内容区域 */
    gap: 1.5rem; /* 24寸显示器标准间距 */
    padding: 1.5rem; /* 24寸显示器标准内边距 */
    overflow: hidden;
}

/* 侧边栏 */
.left-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.panel-card {
    background: var(--card-gradient);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
}

.panel-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.card-header {
    margin-bottom: 1rem;
}

.card-header h3 {
    font-size: 1.5rem; /* 60寸大屏卡片标题字体 */
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
}

.card-header i {
    color: var(--primary-color);
}

/* 状态网格 */
.status-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.status-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.status-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

.status-icon.machine {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-color);
}

.status-icon.warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-color);
}

.status-icon.critical {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error-color);
}

.status-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.status-label {
    font-size: 1.1rem; /* 60寸大屏状态标签字体 */
    color: rgba(255, 255, 255, 0.7);
}

.status-value {
    font-size: 1.8rem; /* 60寸大屏状态数值字体 */
    font-weight: 700;
    color: white;
}

/* 图表容器 */
.chart-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
}

.mini-chart {
    position: relative;
}

.chart-circle svg {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg);
}

.chart-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.chart-percentage {
    display: block;
    font-size: 2.2rem; /* 60寸大屏图表百分比字体 */
    font-weight: 700;
    color: white;
}

.chart-label {
    font-size: 1rem; /* 60寸大屏图表标签字体 */
    color: rgba(255, 255, 255, 0.7);
}

/* 中央内容区域 */
.center-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow: hidden;
}

.content-card {
    background: var(--card-gradient);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: var(--transition-normal);
}

.content-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.content-card .card-header {
    padding: 1.5rem 1.5rem 0;
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-left h3 {
    font-size: 1.6rem; /* 60寸大屏内容区域标题字体 */
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    margin: 0;
}

.header-left i {
    color: var(--primary-color);
}

.badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.refresh-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.refresh-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: rotate(180deg);
}

.auto-refresh {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.auto-refresh i {
    color: var(--primary-color);
}

/* 表格容器 */
.table-wrapper {
    position: relative;
    overflow: auto;
    max-height: 400px; /* 24寸显示器标准表格最大高度 */
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 10;
    border-radius: var(--radius-lg);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 现代化表格 */
.modern-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.4rem; /* 60寸大屏表格内容字体 */
}

.modern-table thead {
    position: sticky;
    top: 0;
    z-index: 5;
}

.modern-table thead tr {
    background: rgba(99, 102, 241, 0.1);
}

.modern-table th {
    padding: 1.2rem 0.75rem; /* 60寸大屏表头内边距 */
    text-align: left;
    font-weight: 600;
    color: white;
    border-bottom: 2px solid rgba(99, 102, 241, 0.3);
    white-space: nowrap;
    font-size: 1.5rem; /* 60寸大屏表头字体 */
}

.modern-table th i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.modern-table td {
    padding: 1rem 0.75rem; /* 60寸大屏表格内容内边距 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    font-size: 1.4rem; /* 60寸大屏表格内容字体 */
}

.modern-table tbody tr {
    transition: var(--transition-fast);
}

.modern-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.modern-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

/* 状态行样式 */
.status-row-normal {
    border-left: 4px solid var(--success-color);
}

.status-row-warning {
    border-left: 4px solid var(--warning-color);
    background: rgba(245, 158, 11, 0.1);
}

.status-row-critical {
    border-left: 4px solid var(--error-color);
    background: rgba(239, 68, 68, 0.1);
}


/* 底部状态栏 */
.modern-footer {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem; /* 60寸大屏底部状态栏字体 */
    color: rgba(255, 255, 255, 0.7);
}

.footer-left,
.footer-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.footer-left span,
.footer-right span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-left i,
.footer-right i {
    color: var(--primary-color);
}

/* 通知系统 */
.notification-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notification {
    background: var(--card-gradient);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-xl);
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

.notification.success {
    border-left: 4px solid var(--success-color);
}

.notification.error {
    border-left: 4px solid var(--error-color);
}

.notification.warning {
    border-left: 4px solid var(--warning-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 1400px) {
    .main-content {
        grid-template-columns: 250px 1fr;
    }
}

@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }
    
    .left-panel {
        flex-direction: row;
        overflow-x: auto;
    }
    
    .panel-card {
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    .modern-header {
        padding: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .modern-footer {
        padding: 0.75rem 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* 动画增强 */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 数据加载动画 */
.data-loading {
    position: relative;
    overflow: hidden;
}

.data-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* 24寸显示器优化 */
@media (min-width: 1920px) and (max-width: 2560px) {
    /* 24寸显示器标准优化，保持合适的比例 */
    .main-content {
        grid-template-columns: 300px 1fr; /* 适中的左侧面板宽度 */
        gap: 1.75rem;
        padding: 1.75rem;
    }
    
    .modern-table {
        font-size: 1.1rem; /* 进一步增大表格字体 */
    }
    
    .logo-text h1 {
        font-size: 1.6rem; /* 稍微增大标题 */
    }
    
    .current-time {
        font-size: 1.2rem; /* 稍微增大时间字体 */
    }
    
    .card-header h3 {
        font-size: 1.2rem; /* 稍微增大卡片标题 */
    }
    
    .status-value {
        font-size: 1.3rem; /* 稍微增大状态数值 */
    }
    
    .chart-percentage {
        font-size: 1.6rem; /* 稍微增大图表百分比 */
    }
}
